package com.dd.service;

import com.dd.dto.OrderItemDTO;
import com.dd.entity.PurchaseOrderDetails;
import com.dd.entity.PurchaseOrders;
import com.dd.entity.PurchaseOrdersVO;
import com.github.pagehelper.PageInfo;

import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
 * <p>
 * 采购订单表 记录采购订单信息 服务类
 * </p>
 *
 * @author dhd
 * @since 2024-10-21
 */
public interface IPurchaseOrdersService {

    void createOrder(List<OrderItemDTO> orderItems);

    void insert(PurchaseOrders purchaseOrders);

    PageInfo<PurchaseOrdersVO> selectAll(Integer pageNum);

    //查询采购订单详情
    List<PurchaseOrdersVO> queryPurchaseOrders(String orderId);

    //更新订单状态第一次更改  状态为2
    int updateStatus(String orderId,int supplierId) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException;
    //更新订单状态第二次更改  状态为3
    int updateStatusByOrderId(String orderId) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException;

}
